<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>10 demo1</title>
    <link rel="stylesheet" href="../static/css/style.css">
    <link rel="stylesheet" href="../static/css/highlight.default.min.css">

    <script src="../static/js/marked.min.js"></script>
    <script src="../static/js/highlight.min.js"></script>
</head>

<body>
    <h1>10 demo1</h1>
    
    <div id="div">
        <button id="btn1">按钮</button>
    </div>
    <script>
        var btn1 = document.getElementById("btn1");
        btn1.onclick = function () { alert("Hello DOM0级事件处理程序1"); } //被覆盖掉
        btn1.onclick = function () { alert("Hello DOM0级事件处理程序2"); }
    </script>
</body>

</html>